package com.jp.refreshlocalcacheserver.net.netty.request;

import com.jp.refreshlocalcacheserver.net.netty.NettyRequest;
import com.jp.refreshlocalcacheserver.net.netty.message.IMessageIds;
import com.jp.refreshlocalcacheserver.net.netty.message.RequestMessage;
import com.jp.refreshlocalcacheserver.net.netty.session.ActiveSessionRegistry;
import com.jp.refreshlocalcacheserver.net.netty.session.SessionData;

/**
 * @Author: jipeng
 * @Description: 客户端 缓存key 注册请求
 * @Date: Created in 2020/5/14 18:01
 */
@NettyRequest( msgId = IMessageIds.REGISTER)
public class CacheKeyRegisterRequest extends RequestMessage {


    @Override
    protected void process(SessionData session) {

        //绑定缓存key 和 通道ID的关联
        ActiveSessionRegistry.addCacheKeyAndChannels(content,session.getChannelId());
    }
}
